#include "golf.h"
// #include <cstring>
#include <iostream>
#include <string>

using std::cin;
using std::cout;
using std::endl;
using std::getline;

void setgolf(golf  &g, string name, int hc)
{
    g.fullname = name;
    g.handicap = hc;
}

int setgolf(golf &g)
{
    cout << "please input name of golf player:" << endl;
    getline(cin, g.fullname);
    if (g.fullname == "") return 0;
    
    cout << "please input handicap of golf player:" << std::endl;
    cin >> g.handicap;
    cin.get();

    return 1;
}

void handicap(golf & g, int hc)
{
    g.handicap = hc;
}

void showgolf(const golf & g)
{
    using std::cout;

    cout << "Name:" << g.fullname << " Handicap:" << g.handicap << std::endl;
}
